home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / C-H / Discipline2.0.2.sit / Discipline 2.0.2 / Discipline Examples / unequalByte.c < prev    next >
C/C++ Source or Header  |  1991-04-09  |  1KB  |  41 lines

  1. #include    <Types.h>
  2.  
  3. pascal    char    *theTest    (long    *selector)
  4. {
  5. char    one;
  6. char    another;
  7.  
  8. switch (selector[0])
  9.     {
  10.     case 0 :            
  11.     /* return test name */
  12.         return ("unequalByte");            
  13.         break;
  14.     case 1 :            /*return test description , including test parameters in “” */ 
  15.         return ("“one,1,B” != “another,2,B” byte.");
  16.         break;
  17.     case 2 :             /*do guts of test or make call to actual test proceduure */
  18.         one = (char) selector [1];
  19.         another = (char) selector [2];
  20.         if (one == another)
  21.             {    return ("Equal.");    }  /*in test return a string for the test*/
  22.         else                            /*failing or nil for test passes */
  23.             {    return (nil);    };
  24.         break;
  25.     default :
  26.         return (nil);
  27.         break;
  28.     };
  29. return (nil);
  30. }
  31.  
  32. /*
  33. make instructions
  34. c unequalByte.c -r -b -t -sym off -mbg off -s {Default} -o unequalByte.c.o
  35. link  -mf -rt dsct=1044 -sg unequalByte="Main" -m "THETEST"        ∂
  36.             -sym off                            ∂
  37.             "unequalByte.c.o"                     ∂
  38.              -o "Discipline Startup"  
  39.  
  40. make sure the dsct number is unique and the segment name is the same as the test name
  41. */